package com.ysd.lis.controller;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.WkEmployeeEducation;
import com.ysd.lis.service.WkEmployeeEducationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 员工档案-学历表 前端控制器
 * </p>
 *
 * @author LiuQi
 * @since 2024-02-22
 */
@RestController
@RequestMapping("/wk/employeeEducation")
public class WkEmployeeEducationController extends BaseController {

    @Autowired
    WkEmployeeEducationService wkEmployeeEducationService;

    @GetMapping("/getEmployeeEducationList/{wkEmployeeId}")
    public Result getEmployeeEducationList(@PathVariable("wkEmployeeId") String wkEmployeeId) {
        return wkEmployeeEducationService.getEmployeeEducationList(wkEmployeeId);
    }

    @PostMapping("/addEmployeeEducation")
    public Result addEmployeeEducation(@RequestBody WkEmployeeEducation wkEmployeeEducation) {
        return wkEmployeeEducationService.addEmployeeEducation(wkEmployeeEducation);
    }

    @PostMapping("/updateEmployeeEducation")
    public Result updateEmployeeEducation(@RequestBody WkEmployeeEducation wkEmployeeEducation) {
        return wkEmployeeEducationService.updateEmployeeEducation(wkEmployeeEducation);
    }

    @PostMapping("/deleteEmployeeEducation")
    public Result deleteEmployeeEducation(@RequestBody WkEmployeeEducation wkEmployeeEducation) {
        return wkEmployeeEducationService.deleteEmployeeEducation(wkEmployeeEducation);
    }

}
